{% extends "base.html" %}
{% block bodycontent %}
    <!--header end-->
    <div id="mainbody">
        <div class="blogs">
            <div class="newlist">
                <h2><span>
      <a href="/">网站首页</a>
      <a href="/grzx/Python">编程相关</a>
      <a href="/grzx/abouttest">技术杂技</a>
      <a href="/grzx/mytalk">个人扯淡</a>
      <a href="/grzx/diary">不知道起什么名</a>
</span>您当前的位置：<a href="/">首页</a>&nbsp;>&nbsp;<a>搜索结果</a></h2>

                <ul>
                    {% if search_statu == 'Error' %}
                        <p class="ptit"><b>没有关于"{{ keywords }}"的内容,请换一个词试试<</b></p>
                    {% endif %}
                    {% if search_status == 'Success' %}
                        <p class="ptit"><b>共有{{ result_amout }}条结果 </b></p>
                        {% for x in search_result %}
                            <p class="ptit"><b><a href="{% url 'article' x.id %}"> {{ x.blog_title }}</a></b></p>
                            <p class="ptime">发布时间：{{ x.blog_timestamp }} 作者：{{ x.blog_author }}
                                分类：{{ x.blog_type }} </p>
                            <div class="pcon">{{ x.blog_body | slice:':100' }}</div>
                            <div class="line"></div>
                        {% endfor %}
                    {% endif %}
                </ul>
            </div>

            <!--bloglist end-->
            <aside>
                <div class="tuijian">
                    <h2>推荐文章</h2>
                    <ol>
                        {% for title in like_rank %}
                            <li><span><strong>{{ forloop.counter }}</strong></span><a
                                    href="{% url 'article' title.id %}">{{ title.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="clicks">
                    <h2>热门点击</h2>
                    <ol>

                        {% for foo in hot_rank %}
                            <li><span><a href="{% url 'article' foo.id %}">{{ foo.blog_type }}</a></span><a
                                    href="{% url 'article' foo.id %}">{{ foo.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="search">
                    <form class="searchform" method="post" action="/search">
                        {% csrf_token %}
                        <input type="text" name="keywords" value="输入文章标题搜索" onfocus="this.value=''"
                               onblur="this.value='输入文章标题搜索'">
                    </form>
                </div>

            </aside>

        </div>

        <!--blogs end-->

    </div>
    <!--mainbody end-->
{% endblock bodycontent %}